package com.ebelter.bodyfatscale.ui.activity;


import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.ebelter.bodyfatscale.R;
import com.ebelter.bodyfatscale.moudules.update.Updater;
import com.ebelter.bodyfatscale.util.AppUtils;
import com.ebelter.bodyfatscale.util.StringUtils;

import butterknife.BindView;
import butterknife.OnClick;

public class AboutActivity extends BaseActivity {

    @BindView(R.id.modify_back_bt)
    ImageView back_iv;

    @BindView(R.id.app_version_tv)
    TextView app_version_tv;


    @BindView(R.id.about_check_rl)
    RelativeLayout about_check_rl;

    private Updater mUpdater;


    @Override
    protected int loadLayoutById() {
        return R.layout.about_ly;
    }

    @Override
    protected void initViews() {
        //StatusBarUtil.setDarkStatusIcon(this,true);

        mUpdater=new Updater();

    }

    @Override
    protected void initData() {

        app_version_tv.setText(StringUtils.getResStr(R.string.current_app_version)+" "+ AppUtils.getVerName(this));

    }


    @OnClick({ R.id.modify_back_bt,R.id.about_check_rl})
    public void btClick(View view){
        switch (view.getId()){
            case R.id.modify_back_bt:
                finish();
                break;
            case R.id.about_check_rl:
                mUpdater.checkVersion(AboutActivity.this,true,false);
                break;
        }
    }


}
